package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.SportPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SportPicMapper {

    @Insert("insert into sport_pic (id,picture)" +
            "values (#{sport_pic.id}, #{sport_pic.picture})")
    int insert(@Param("sport_pic") SportPic record);

    @Select("SELECT * FROM sport_pic WHERE id = #{id}")
    List<SportPic> selectByPrimaryKeyLiist(Long id);

    @Delete("DELETE FROM sport_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);

    List<SportPic> selectAll();

    int updateByPrimaryKey(SportPic record);
}